**Kalmoe & Mason - How to Measure Public Support for Political Violence 

*Replication File for 2019 Qualtrics Analysis


use "/Users/npkalmoe/Dropbox/Research/A Publishing/A Mason-Kalmoe Extreme Partisanship/Facebook Studies/Qualtrics Studies/Qualtrics Study 3.dta", clear

set more off

*Party ID
gen rep7= .
recode rep7 .=-1 if qid1==1 & qid2==1
recode rep7 .=-.67 if qid1==1 & qid2==2
recode rep7 .=-.33 if (qid1==3|qid1==4) & qid4==1
recode rep7 .=0 if (qid1==3|qid1==4) & (qid4==3|qid4==4)
recode rep7 .=.33 if (qid1==3|qid1==4) & qid4==2
recode rep7 .=.67 if qid1==2 & qid3==2
recode rep7 .=1 if qid1==2 & qid3==1

gen rep3=rep7
recode rep3 -.33 -.67=-1 .33 .67=1

gen partisan=1
recode partisan 1=0 if rep3==0

*Randomization
gen control=0
recode control 0=1 if bl_6s6flnhxzdpb5mb_do_q72==1
gen fewext=0
recode fewext 0=1 if bl_6s6flnhxzdpb5mb_do_q21==1
gen manyext=0
recode manyext 0=1 if bl_6s6flnhxzdpb5mb_do_q20==1

gen anypoll=1-control


* In-Party Violence
gen inviol=qid79
replace inviol=qid80 if inviol==.
replace inviol=(inviol-1)/4



** Analysis

reg inviol manyext fewext if partisan==1

**Table 7
tab inviol anypoll if partisan==1, col

reg inviol anypoll if partisan==1


